home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
039a
/
artcpy20.zip
/
ARTCOPY.DOC
next >
Wrap
Text File
|
1991-11-17
|
14KB
|
381 lines
A R T C O P Y
Version 2.00
BGI Device Drivers
for Hewlett Packard LaserJet
Epson Compatible Dot Matrix Printers
and
HPGL Pen Plotters
Copyright (C) B. McAra Software 1991
All Rights Reserved
ArtCopy
License Agreement
ArtCopy is the property of B. McAra Software. Users
are permitted to use this software subject to the following terms
and conditions:
You may use this software on a single machine and make copies
of this software for backup purposes. Other than this you
may use this software as if it were a book - meaning it may
be used by any number of people and may be moved from one
computer to another providing that there is no possibility
that it may be used by more than one person at one time. In
the case of the Introduction Package you may give copies to
others provided that the entire package (all files) are included
and that no modifications are made to the files. Although
the Introduction Package is free I request that you register
your copy with me (at no charge) in this way I can notify you
of updates.
Programs written with or using ArtCopy may be used, given away
or sold provided that such programs bear a copyright notice
either your own or "Created Using ArtCopy (C) B. McAra Software
1990, All Rights Reserved" and that only the .BGI files are
distributed with such programs (eg: no source or support files
which are part of ArtCopy or were created with ArtCopy may
be included). In the case of the Introduction Package the
entire package must be distributed with your program in un-
modified form. Developers Package licensees may distribute
the file SETUPPRN.EXE along with the BGI files.
Limited Warranty:
I will replace the original disks for free for a period of
one year in the case of physical defects provided you return
the defective disk. I specifically disclaim all other warranties
express, implied or statutory including but not limited to
merchantability or suitability for a particular purpose. In no
case will I be liable for any loss of business profit or any
other damage including but not limited to special, incidental,
consequential or other damages.
ArtCopy
CONTENTS
Introduction
Using the ArtCopy Drivers with Borland Compilers
User Configuration Files
Order Form
Enhancement Request/Bug Report Form
ArtCopy
Introduction
ArtCopy is a collection of printer driver files which
make use of the Borland Graphic Interface to provide programmers
who use Borland compilers (Turbo Pascal, Turbo C, C++ and Prologue)
with a convenient way of producing hard-copy output of screen
graphics.
These drivers do not merely "dump" screen buffers to the
printer. The full resolution of the output device can be used.
Graphic library calls such as Line, Circle, PieSlice etc. produce
output on printers and plotters.
ArtCopy is written in assembler to maximize speed and
to minimize memory requirements leaving as much memory as possible
for your programs and data. Since printers like the HP LaserJet
can produce full page output at 300 dots per inch the graphics
buffer could be as large as 1 megabyte. ArtCopy uses temporary
files or Expanded Memory (EMS) to swap data to disk thus keeping
conventional memory demands of the driver to about 5000 bytes.
If Expanded Memory (EMS LIM Specification) such as Intel Aboveboard
or CEMM, is available the drivers will use this for rendering
graphics otherwise the drivers will use a temporary disk file.
The temporary file can be directed to a RAM disk to maximize speed
(Developers Package only).
ArtCopy is available in two versions: an Introduction
Package which provides basic printer functionality with BGI
files for laser printers, dot matrix printers and HPGL plotters
and The BGI Developers Package which provides more advanced
printer support including user configuration settings and
complete source code.
The Introduction Package is available for free - include $5
for shipping and handling and can be used to create programs for
sale or distribution subject to certain restrictions (see
Licensing Agreement). The Developers Package is available for
$20 plus $5 shipping and handling and provides full customization
capabilities. Programs created with the Developers Package may
include user customized drivers or drivers which have been
incorporated into the user program itself.
Upgrades from version 1.00 or 1.10 to version 2.00 of the
Developers Package can be ordered for $5.00.
ArtCopy
Using ArtCopy with Borland Compilers
ArtCopy driver files are loaded by the graphics library
supplied with your Borland compiler in the same way that .BGI
screen drivers are except that one extra step is required:
using the InstallUserDriver function. See your compiler manual
for details and review the sample code provided.
Printers differ from screens in several important ways
from a programming point of view. First of all printers are
attached to the computer by means of serial or parallel ports
or a network device. ArtCopy uses DOS device handles to
access printers however they are attached. Secondly dot matrix
and laser printers require that graphics be encoded as "rasters".
A raster is a series of bytes with bits representing dots where
pins will hit or toner will be deposited. This means that the
output must be prepared for the entire graphic page and then
dumped to the printer. ArtCopy uses a temporary file or EMS to
store the rasters while the picture is being created thus sufficient
disk space or Expanded Memory must be available at run time.
In the case of the Introduction Package the MATRIX and
HPPCL (LaserJet) drivers send output to the first parallel port
on the PC and the HPGL (plotter) driver sends output to the COM1
device. The Developers Package drivers use the .CFG file to
send output to whatever device is required. A set up program is
supplied to modify these settings.
Communications Settings
Device communication parameters are not set by the BGI
driver. If the printer or plotter is attached to a serial port
the port should be set up by your program or by the DOS MODE
command (eg: MODE COM2:9600,e,7,1,p) before starting the program.
Scaling and Device Independence
To maintain device independence your programs should
avoid using absolute values for graphic coordinates. Instead
use GetMaxX and GetMaxY functions after calling InitGraph
to obtain these values and then scale all coordinates to these
values.
ArtCopy
Using With Borland Compilers
Color
The HPGL driver allows for multi-color drawings by
selection of pens. The SetColor function will cause the plotter
to select the pen which corresponds to the color number parameter.
SetColor(0) will cause the plotter to put the pen away. Your
program should prompt the user to mount pens in the correct order
before issuing drawing commands.
Paper Size
The Introduction Package always produces portrait mode
output of half-page size on 8 1/2 x 11 pages on Laserjet and
matrix printers. The Developer Package provides separate drivers
for full page landscape mode drawing on these printers (MATRIXF
& HPPCLF).
The HPGL plotter driver maps user coordinates to plotter
P1 and P2 points. These points are determined by the paper
size switch on the plotter or may be changed by the user from
the plotter control panel.
Temporary Files
If Expanded Memory is not available ArtCopy uses a
temporary file to hold the graphics raster data in order to
minimize conventional memory requirements. By default this
file (TEMP.$$$) is created in the current directory at
run time and deleted when you call CloseGraph.
The Developers Package allows you to control which drive
or directory is used. A .CFG file contains the drive and path
names as required for each driver. Directing the temporary file
to a RAM disk will improve the speed of the driver. However
for maximum performance the use of Expanded (EMS) Memory is
strongly recommended. My testing indicates up to a 20:1 speed
advantage of EMS over a RAM disk.
If EMS is not available your program should ensure that
sufficient disk space is available at run time for the temporary
file.
ArtCopy
Configuration File
The Developers Package contains drivers which use
configuration files to determine which port will be used by
a driver and which drive and directory will be used for
temporary files. These files use the same name as the driver
they are used with and have an extension of .CFG. For
example HPGL.BGI will use HPGL.CFG.
The Developers Package also includes a configuration
editor (SETUPPRN.EXE) which can be used to change the CFG files.
This program may be included with any programs you sell or distribute
to allow users to easily change the CFG file.
ArtCopy
Order Form
Name ....................................
Address .................................
City ............... State/Prov ........
ZIP/Postal Code .........................
Phone Number (. . .) . . . - . . . .
I program in: --- Turbo Pascal ---Turbo C --- Borland C++
--- Other (specify) ..........................
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Please forward the following: Price Shipping and Total
Handling
--- ArtCopy Introduction Package Free $5.00 $5.00 -----
--- ArtCopy Developers Package $20.00 $5.00 $25.00 -----
--- ArtCopy Developers Upgrade Free $5.00 $5.00 -----
Saskatchewan Residents Add 7% PST -----
Canadian Residents Add 7% GST -----
Total -----
--- ArtCopy Introduction Package
REGISTRATION ONLY Free Free
Version Number (See First Page of this DOC File) ......
=====================================================================
Check one:
....Cheque or Money Order Enclosed
....Please charge to my VISA/Master Card as indicated below:
VISA Card Number .............................. Expires .......
Signature .......................................
(Sorry I can no longer accept MasterCard orders.)
====================================================================
Mail this form with your cheque or money order to:
B. McAra Software
1449 Shannon Road
Regina, Saskatchewan
S4S 5L4
ArtCopy
Enhancement Request/BUG Report
Registration Number .....................
Name ....................................
Address .................................
City ............... State/Prov ........
ZIP/Postal Code .........................
Phone Number (. . .) . . . - . . . .
Date .................
Description of Problem
.................................................................
.................................................................
.................................................................
.................................................................
.................................................................
Suggested Solution/Improvement
.................................................................
.................................................................
.................................................................
Mail to:
B. McAra Software
1449 Shannon Road
Regina, Saskatchewan
S4S 5L4